﻿using Nop.Core.Domain.Customers;
using System;

namespace Nop.Services.Customers
{
    public class NameExtensionService
    {
        public static INameExtensions For(NameExtensionType nameExtensionType)
        {
            if (NameExtensionType.Prefix == nameExtensionType)
            {
                return new Salutations();
            }
            if (NameExtensionType.Suffix == nameExtensionType)
            {
                return new NameSuffixes();
            }
            throw new ArgumentException("no extension found");
        }
    }
}
